<include file="_head,_download_app"/>

<body>


<section class="app_shopimg" style="border-top:0;">
    <div class="swiper-container" id="jsLayoutBanner">
        <div class="swiper-wrapper">


            <empty name="slides">
                <div class="swiper-slide"><img src="{$thumb_img}"/></div>
            <else/>
                <volist name="slides" id="vo">
                    <div class="swiper-slide"><img
                            src="{:qiniu_mirror_image_url($vo['url'],'imageView2/1/w/480/h/480')}"/></div>
                </volist>
            </empty>

        </div>
        <div class="swiper-pagination"></div>
    </div>
</section>

<section class="app_shopinfo">
    <h3>{$goods_name}</h3>
    <p><span>¥</span>{$goods_price}</p>
    <notempty name="Think.get.token">
        <i id="share-btn"></i>
    </notempty>
</section>
<section class="app_shopintro">
    <div class="tit">
        <h2>商品介绍</h2>
        <p>goods profile</p>
    </div>
    <!--<div class="cnt">-->
        <!--<p>{$goods_description}</p>-->
        <!--<img id="image-icon" src="{$thumb_img}"/>-->
    <!--</div>-->
<!--</section>-->
<!--<section class="app_shopshow">-->
    <!--<div class="tit">-->
        <!--<h2>商品展示</h2>-->
        <!--<p>goods display</p>-->

    <!--</div>-->
    <div class="cnt">
        <p>{$goods_content}</p>
        <volist name="slides" id="vo">
            <img src="{:qiniu_mirror_image_url($vo['url'],'imageView2/1/w/675/h/675')}"/>
        </volist>
    </div>
</section>
<script type="text/javascript">

    var shareUrl = 'https://' + window.location.host + "{:U('/H5/Web/goods',['id'=>$id])}";
    var shareTitle = $('h3').text();
    var shareContent = $('.cnt p').text();
    var shareImage = "{$thumb_img}";

    $(function () {
        $('#share-btn').click(function () {
            MobileApi.onShareClick(shareUrl, shareTitle, shareContent, shareImage);
        })

        var Li = $('#jsLayoutBanner .swiper-slide').length;
        console.log(Li);
        if(Li>1){
            var layoutSwiper = new Swiper('#jsLayoutBanner', {
                autoplay: 3000,
                loop: 'loop',
                pagination: '.swiper-pagination',
                paginationClickable: true
            });
            layoutSwiper.startAutoplay();
        }else{

        }
    });

</script>
</body>
</html>
